<template>
  <div id="sort-nav-bar">
    <nav-bar>
      <div slot="left" class="gohome">
        <el-button @click="goBack">首页</el-button>
      </div>
      <div slot="center" class="title">
        <!-- <el-button v-for="(item ,index) in titleList" class="sort-item" :key="index">
          {{item.name}}
        </el-button> -->
        <el-button @click="goCompareSort">比较排序</el-button>
        <el-button @click="goRadixSort">基数排序</el-button>
        <el-button @click="goHeapSort">堆排序</el-button>
      </div>
      <div slot="right" class="user">

      </div>
    </nav-bar>
  </div>
</template>

<script>
import NavBar from './NavBar'
export default {
  name:'SortNavBar',
  data(){
    return{
      
      // titleList:[
      //   {
      //     id:1,
      //     name:'比较排序',
      //     methods:'goCompareSort()'
      //     },
      //   {
      //     id:2,
      //     name:'基数排序',
      //     methods:'goRadixSort()'
      //     },
      //   {
      //     id:3,
      //     name:'堆排序',
      //     methods:'goHeapSort()'
      //     }
      // ]
    }
        
   
  },
  components:{
    NavBar
  },
  methods:{
    goBack(){
      this.$router.push('home')
    },
    goCompareSort(){
      this.$router.push('compareSort')
    },
    goHeapSort(){
      this.$router.push('heapSort')
    },
    goRadixSort(){
      this.$router.push('radixSort')
    }
  }
}
</script>

<style>

</style>